import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import './index.scss'
import VueDragResize from 'vue-drag-resize'
import 'vue-context/dist/css/vue-context.css';
import VueRouter from 'vue-router';
import router from './router/index.js';
import context from '../src/utils/output.js'
import httpServer from "@/utils/request.js";
import JsonViewer from 'vue-json-viewer'
import store from '@/store/index'
import 'vue-json-viewer/style.css'
//第三方库
import _ from 'lodash'
// import "default-passive-events"
import bus from '@/utils/bus'


Vue.config.productionTip = false
Vue.component('DraggerComp', VueDragResize)
Vue.use(ElementUI)
// Vue.use(animate)
Vue.use(context)
Vue.use(VueRouter)
Vue.use(JsonViewer)
Vue.use(_)

const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

Vue.prototype.$bus = bus
Vue.prototype.httpServer = httpServer

new Vue({
  render: h => h(App),
  store,
  router
}).$mount('#app')
